<?php						
						if($_GET['act'] == 'insert'){
						$con = mysql_connect('localhost','root','root'); //创建数据库连接
						if(!$con){ //如果失败
						    die('连接mysql数据库失败'.mysql_error()); //显示出错误信息
						}
						 
						mysql_select_db("yoshopo",$con); //选择需要使用的数据库
						$sql = "insert into yoshop_user (open_id,nickName,avatarUrl,gender,country,province,city,create_time) values ('".$_POST['open_id']."','".$_POST['nickName']."','".$_POST['avatarUrl']."','".$_POST['gender']."','".$_POST['country']."','".$_POST['province']."','".$_POST['city']."','".$_POST['create_time']."')";
						mysql_query($sql);
						echo "<p>插入数据成功</p>";
						mysql_close($con);
						}
						?>

						 <form action="index.php?act=insert" method="post"> 
	
						<tr>
							<td>用户ID:</td>
							<td><input type="text" name="open_id"></td>
						</tr>
						<tr>
							<td>微信头像:</td>
							<td><input type="text" name="nickName"></td>
						</tr>
						<tr>
							<td>微信昵称:</td>
							<td><input type="text" name="avatarUrl"></td>
						</tr>
						<tr>
							<td>性别:</td>
							<td><input type="text" name="gender"></td>
						</tr>
						<tr>
							<td>国家:</td>
							<td><input type="text" name="country"></td>
						</tr>
						<tr>
							<td>省份:</td>
							<td><input type="text" name="province"></td>
						</tr>
						<tr>
							<td>城市:</td>
							<td><input type="text" name="city"></td>
						</tr>
						<tr>
							<td>注册时间:</td>
							<td><input type="text" name="create_time"></td>
						</tr>
						<tr>
						
					<tr>
						<td> </td>
						
						<td><input type="submit" name="提交"></td>
					</tr>
				
				
				
                                </tr>
				
				 -->
